Skip to content

ci: release on every push to main - #30

Merged
kieronlanning merged 1 commit into
mainfrom
ci/release-on-main
Nov 18, 2026
Merged

kieronlanning merged 1 commit into
mainfrom
ci/release-on-main

Conversation

@kieronlanning

Copy link
Copy Markdown
Contributor

Releases now publish when a package.json version bump is merged into main, instead of needing a release/** branch.

Important

Merging this PR publishes 1.0.0-prerelease.14 to nuget.org. main already carries that version and it has no tag yet; a local release-explain with GITHUB_REF=refs/heads/main gives Verdict: Release (REL001–REL003 pass). If you don't want .14 published yet, bump package.json in this PR first, or merge it when you're ready to ship .14.

Changes

  • release.yml: triggers on push: main (and manual dispatch) instead of release/**.
  • cancel-in-progress: false: a release cancelled between publishing and tagging would leave a version on nuget.org with no tag or GitHub release, so a later merge now queues instead.
  • Eligibility policy: .config/purview-build.json changes from TrunkReservesMinor to ReleaseOnMain, the tool's default. Without this the tool treats main as a trunk it doesn't publish from, and changing the trigger alone would only ever produce Skip.
  • Merges without a version bump: they still run the release job, which skips because the tag exists (REL002) and finishes green.
  • Trusted Publishing: the nuget.org policy is registered against the file name release.yml, which is unchanged.
  • Docs: Release-Flow.md, AGENTS.md and the pr.yml comment now describe the merge-to-release flow; the release-branch instructions are removed.

Validation

  • actionlint passes.
  • purview-build release-explain with ReleaseOnMain on refs/heads/main gives: Release.

A merge to main now publishes: release.yml runs on push to main (and
manual dispatch) instead of release/** branches, and the eligibility
policy is ReleaseOnMain. The tool still decides per push: a package.json
version with no v<version> tag is published to nuget.org and tagged with
a GitHub release; an already-released version is skipped (REL002), so a
merge without a version bump publishes nothing.

Release runs are no longer cancelled in flight, because a run cancelled
between publishing and tagging would leave a published version with no
tag. The workflow file name, which the nuget.org Trusted Publishing
policy is registered against, is unchanged.
@kieronlanning
kieronlanning merged commit 8da7a41 into main Nov 18, 2026
3 checks passed
@kieronlanning
kieronlanning deleted the ci/release-on-main branch November 18, 2026 17:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant